<script>
import { ref } from 'vue';
export default {
  setup() {
    let msg = "helloworld"
    let username = "admin"
    let num = ref(100);
    let incr = ()=>{
      num.value++;
      console.log(num.value);
    }
    let decr = ()=>{
      num.value--;
      console.log(num.value);
    }
    return {
      msg,username,num,incr,decr
    }
  }
}
</script>

<template>
  <div>
    <h1>{{ msg }}</h1>
    <input type="text" :value="username"><br>
    <input type="button" value="+" @click="incr">
    {{ num }}
    <input type="button" value="-" @click="decr">
  </div>
</template>

<style scoped></style>
